#include <stdio.h>
#include <signal.h>
#include <sys/types.h>

void sigHandle(int sig){
    printf("sig:%d\n",sig);
    return;
}

int main(){
    struct sigaction ac;
    ac.sa_handler = sigHandle;
    sigemptyset(&ac.sa_mask);
    ac.sa_flags = 0;
    if(-1 == sigaction(SIGUSR1,&ac,NULL)){
        perror("sigaction:\n");
        return 1;
    }
    raise(SIGUSR1);
    printf("signal end\n");
    return 0;
}
